package com.smart.community.region.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * 社区数据传输对象
 * 
 * @author Wu.Liang
 * @since 2024-12-21
 */
@Data
@Schema(description = "社区信息DTO")
public class CommunityDTO {

    @Schema(description = "社区ID")
    private Long id;

    @Schema(description = "社区编码")
    @Size(max = 50, message = "社区编码长度不能超过50个字符")
    private String communityCode;

    @Schema(description = "社区名称", required = true)
    @NotBlank(message = "社区名称不能为空")
    @Size(max = 100, message = "社区名称长度不能超过100个字符")
    private String communityName;

    @Schema(description = "所属区域ID", required = true)
    @NotNull(message = "所属区域ID不能为空")
    private Long regionId;

    @Schema(description = "物业公司ID")
    private Long propertyCompanyId;

    @Schema(description = "详细地址")
    @Size(max = 200, message = "详细地址长度不能超过200个字符")
    private String address;

    @Schema(description = "面积（平方米）")
    private BigDecimal area;

    @Schema(description = "楼栋数量")
    private Integer buildingCount;

    @Schema(description = "房户数量")
    private Integer householdCount;

    @Schema(description = "居民数量")
    private Integer residentCount;

    @Schema(description = "负责人姓名")
    @Size(max = 50, message = "负责人姓名长度不能超过50个字符")
    private String managerName;

    @Schema(description = "纬度")
    private BigDecimal latitude;

    @Schema(description = "经度")
    private BigDecimal longitude;

    @Schema(description = "物业公司")
    @Size(max = 100, message = "物业公司长度不能超过100个字符")
    private String propertyCompany;

    @Schema(description = "物业电话")
    @Size(max = 20, message = "物业电话长度不能超过20个字符")
    private String propertyPhone;

    @Schema(description = "联系电话")
    @Size(max = 20, message = "联系电话长度不能超过20个字符")
    private String contactPhone;

    @Schema(description = "备注")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    @Schema(description = "排序字段")
    private Integer sortOrder;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "更新人ID")
    private Long updateBy;
} 